/**
 * Copyright 2009 Wisdom
 */
package com.wisdom.model.dao;

import java.util.List;

import com.wisdom.exceptions.UserNotFoundException;
import com.wisdom.model.entities.User;

/**
 * This is user data access object.
 * 
 * @author alekseiko
 * @since 1.0
 */
public interface UserDao {

    /**
     * Get user by login and password
     * 
     * @param login - user login
     * @param password - user password
     * @return {@link User}
     * @throws UserNotFoundException 
     */
    User getUser(String login) throws UserNotFoundException;
    void addUser(User user);
    void deleteUser(User user);
    User deleteUser(String login) throws UserNotFoundException;
    void updateUser(User user);

    List<User> listUsers();
    boolean isCorrectLogin(String login);
    boolean checkPassword(String pass);    
}
